﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using MySqlQueryToolkit.DataAccess;

namespace MySqlQueryToolkitTests
{
    [TestClass]
    public class MysqlDataAccessTests
    {
        [TestMethod]
        [TestCategory("Integration")]
        public void CheckConnectionWithGoodConnectionExpectTrue()
        {
            var target = new MySqlDataAccess("Server=localhost;Uid=root;Pwd=root;port=3306;");

            Assert.IsTrue(target.CheckConnection());
        }

        [TestMethod]
        [TestCategory("Integration")]
        public void CheckConnectionWithBadConnectionExpectFalse()
        {
            var target = new MySqlDataAccess("Server=localhost;Uid=fake;Pwd=nothing;port=3306;");

            Assert.IsFalse(target.CheckConnection());
        }
    }
}
